package com.yhd.controller;

import com.yhd.MenuService;
import com.yhd.entity.Menu;
import com.yhd.model.PageInfo;
import com.yhd.model.ResultPage;
import com.yhd.model.dto.WebResultDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@CrossOrigin
@RequestMapping

public class TestController extends WebBaseController {
    @Autowired
    private MenuService menuService;


    @ApiOperation(value = "分页任务列表", httpMethod = "POST", notes = "分页任务列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageInfo", value = "分页请求实体", paramType = "body", required = true, dataType = "PageInfo"),
    })
    @PostMapping("/queryList")
    public WebResultDto queryList(@RequestBody PageInfo pageInfo){
        ResultPage<Menu> page=menuService.getMenuList( pageInfo);
        return success( page);

    }
}
